package cn.codeartist.springboot.example.controller;

import cn.codeartist.springboot.example.entity.People;
import org.springframework.web.bind.annotation.*;

/**
 * jnai
 *
 * @author 艾江南
 * @date 2020/8/20
 */
@RestController
@RequestMapping("log")
public class LogController {

    @GetMapping
    public People get(People people) {
        return people;
    }

    @PostMapping
    public People post(People people) {
        throw new NullPointerException("Null");
    }

    @PostMapping("json")
    public People postJson(@RequestBody People people) {
        return people;
    }
}
